import {productStatus as _productStatus} from "@/config/dictionary";

export function useGetGoodsStatus() {
  const productStatus = ref(_productStatus)

  const getProductStatus = (value: number | string) => {
    let _value = typeof value === 'string' ? Number(value) : value
    const target = productStatus.value.find(item => item.value === _value)
    return target?.label ?? target?.value
  }

  return {
    productStatus,
    getProductStatus
  }
}
